package org.sloth.core.move
{
	import flash.geom.Point;
	
	import org.sloth.core.IUID;
	import org.sloth.core.StringUtil;
	
	public class MoveVO implements IUID
	{
//============================================================================
//PROPERTY
//============================================================================
		private var _uid:String;
		private var _path:Array;
		private var _speed:uint;
		private var _moved_cb:Function;
		private var _update_cb:Function;
		private var _data:*;
		
		private var _curPosition:Point;
		private var _curDirection:Number;
//============================================================================
//CONSTRUCTOR
//============================================================================
		public function MoveVO(path:Array, speed:uint, moved_cb:Function = null, update_cb:Function = null, data:* = null)
		{
			_uid = StringUtil.createUID();
			
			_path = path;
			_speed = speed;
			_moved_cb = moved_cb;
			_update_cb = update_cb;
			_data = data;
		}
//============================================================================
//getter/setter
//============================================================================
		
		public function get uid():String
		{
			return _uid;
		}
		public function set uid(value:String):void
		{
			_uid = value;
		}
		/** 移动路径 */
		public function get path():Array
		{
			return _path;
		}
		/** 移动速度（单位：px/毫秒） */
		public function get speed():uint
		{
			return _speed;
		}
		/** @private */
		public function set speed(value:uint):void
		{
			_speed = value;
		}
		/** 移动完成后回调，参数类型：MoveVO */
		public function get moved_cb():Function
		{
			return _moved_cb;
		}
		/** @private */
		public function set moved_cb(value:Function):void
		{
			_moved_cb = value;
		}
		/** 移动更新回调，参数类型：MoveVO */
		public function get update_cb():Function
		{
			return _update_cb;
		}
		/** @private */
		public function set update_cb(value:Function):void
		{
			_update_cb = value;
		}
		/** 移动过程需要传递的数据 */
		public function get data():*
		{
			return _data;
		}
		/** @private */
		public function set data(value:*):void
		{
			_data = value;
		}
		/** 移动的当前位置 */
		public function get curPosition():Point
		{
			return _curPosition;
		}
		/** @private */
		public function set curPosition(value:Point):void
		{
			_curPosition = value;
		}
		/** 移动的当前朝向 */
		public function get curDirection():Number
		{
			return _curDirection;
		}
		/** @private */
		public function set curDirection(value:Number):void
		{
			_curDirection = value;
		}


	}
}